<script setup lang="ts">
import type { TopupIn } from '$/client-user'
import type { CommonFormProps } from '@/types'
import { Form, FormItem, FormSubmit, Input, NumberInput } from 'vexip-ui'

defineProps<CommonFormProps>()

const model = defineModel<TopupIn>({ required: true })
</script>

<template>
  <Form :model="model" :loading="loading">
    <FormItem label="备注" prop="description">
      <Input :max-length="50" />
    </FormItem>
    <FormItem label="充值金额" prop="amount" all-required>
      <NumberInput :precision="2" />
    </FormItem>
    <FormItem action>
      <FormSubmit @submit="submit" block />
    </FormItem>
  </Form>
</template>
